package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * PropertyCalcRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PROPERTY_CALC_RULE")
public class PropertyCalcRule implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = -6911115118562736935L;

    // Fields    
    private Long id;
    private Long resId;
    private Long propId;
    private Integer calcType;
    private String calcParam;

    // Constructors

    /** default constructor */
    public PropertyCalcRule() {
    }

    /** minimal constructor */
    public PropertyCalcRule(Long id) {
        this.id = id;
    }

    /** full constructor */
    public PropertyCalcRule(Long id, Long resId, Long propId, Integer calcType, String calcParam) {
        this.id = id;
        this.resId = resId;
        this.propId = propId;
        this.calcType = calcType;
        this.calcParam = calcParam;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "PROPERTY_CALC_RULE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "PROP_ID", precision = 18, scale = 0)
    public Long getPropId() {
        return this.propId;
    }

    public void setPropId(Long propId) {
        this.propId = propId;
    }

    @Column(name = "CALC_TYPE", precision = 1, scale = 0)
    public Integer getCalcType() {
        return this.calcType;
    }

    public void setCalcType(Integer calcType) {
        this.calcType = calcType;
    }

    @Column(name = "CALC_PARAM", length = 512)
    public String getCalcParam() {
        return this.calcParam;
    }

    public void setCalcParam(String calcParam) {
        this.calcParam = calcParam;
    }

    @Override
    public String toString() {
        return "PropertyCalcRule [id=" + id + ", resId=" + resId + ", propId=" + propId + ", calcType=" + calcType + ", calcParam=" + calcParam + "]";
    }

}